package designs.models.builder.example.one;

public class Director {
	private Builder builder;
	int year,month;
	public Director(Builder builder,int year,int month) {
		this.builder = builder;
		this.year = year;
		this.month = month;
	}
	
	public void constructProduct() {
		boolean ok = false;
		ok= builder.buildWeekTitle();
		if (ok) {
			ok = builder.buildCalendar(year, month);
		}
		if (ok) {
			builder.buildTitle();
			builder.buildDayOfMonth();
		}
		if (ok) {
			CalendarProductPad calendarProductPad = builder.getCalendarProductPad();
			calendarProductPad.showCalendarPad();
		}
	}
}
